package Model;

import java.util.ArrayList;

import Model.interfaces.Iassociation;

public class Association implements Iassociation{
	private Classe classen[]=new Classe[2];
	private ArrayList<Classe> clas=new ArrayList<Classe>();
	private Classe[] test;
	private String Functionality;
			
			
	
	public Association(){
		
	}
	
	@Override
	public void addUpper(Classe upper) {
		clas.add(upper);
		if(classen[0]==null){
			classen[0]=upper;
		}else{
			classen[1]=upper;
		}
		
		
	}

	@Override
	public void addLower(Classe lower) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void addFunctionality(String functionality) {
		this.Functionality=functionality;
		
	}

	public Classe[] getClassen() {
		return classen;
	}

	public void setClassen(Classe classen[]) {
		this.classen = classen;
	}
	public String toString(){
		return "ay lagi hoodee";
	}

	public ArrayList<Classe> getClas() {
		return clas;
	}

	public void setClas(ArrayList<Classe> clas) {
		this.clas = clas;
	}

	@Override
	public Classe getupper() {
	
		return clas.get(0);
	}

	@Override
	public Classe getLower() {
		// TODO Auto-generated method stub
		return clas.get(1);
	}

	@Override
	public String getFunctionality() {
		
		return Functionality;
	}

}
